package com.keyue.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.keyue.common.constant.ServerResult;
import com.keyue.domain.dto.LocalStorageDO;
import com.keyue.domain.vo.LocalStorageQueryVO;
import com.keyue.domain.vo.LocalStorageVO;
import org.springframework.web.multipart.MultipartFile;

/**
 * 本地存储(LocalStorage)表服务接口
 *
 * @author makejava
 * @since 2023-10-08 14:52:36
 */
public interface LocalStorageService extends IService<LocalStorageDO> {

    /**
     * 通过阿里oss上传
     *
     * @param name
     * @param file
     * @return
     */
    ServerResult uploadByAliOss(String name, MultipartFile file);

    /**
     * @param name
     * @param file
     * @return
     */
    ServerResult uploadByMinIO(String name, MultipartFile file);

    /**
     * @param name
     * @param file
     * @return
     */
    ServerResult uploadFileByAliOss(String name, MultipartFile file);

    /**
     * @param name
     * @param file
     * @return
     */
    ServerResult uploadByAliOssV2(String name, MultipartFile file);

    /**
     * @param name
     * @return
     */
    ServerResult getUrl2ossV2(String name);

    ServerResult create(String name, MultipartFile file);

    /**
     * 通过ID查询单条数据
     *
     * @param localStorageQueryVO 主键
     * @return 实例对象
     */
    ServerResult queryById(LocalStorageQueryVO localStorageQueryVO);

    /**
     * 分页查询
     *
     * @param localStorageQueryVO 筛选条件
     * @return 查询结果
     */
    ServerResult list(LocalStorageQueryVO localStorageQueryVO);

    /**
     * 新增数据
     *
     * @param localStorageVO 数据VO
     * @return 新增结果
     */
    ServerResult add(LocalStorageVO localStorageVO);

    /**
     * 修改数据
     *
     * @param localStorageVO 数据VO
     * @return 编辑结果
     */
    ServerResult edit(LocalStorageVO localStorageVO);

    /**
     * 通过主键删除数据
     *
     * @param localStorageQueryVO 筛选条件
     * @return 是否成功
     */
    ServerResult deleteById(LocalStorageQueryVO localStorageQueryVO);

}
